// new Proxy(target, handler) target---要拦截的·对象·，handler用来处理拦截行为的·对象·
// var obj = new Proxy({}, {
//   get: function (target, key, receiver) {
//     console.log('gettint',target, key, receiver)
//     return Reflect.get(target, key, receiver)
//   },
//   set: function (target, key, value, receiver) {
//     console.log('setting', target, key, value, receiver)
//     return Reflect.set(target, key, value, receiver )
//   }
// })

// var obj1 = new Proxy({}, {
//   get: function (target, property) {
//     return 35
//   }
// })
// console.log(obj1.time)
// console.log(obj1.name)
// console.log(obj.count)

var a = new Proxy([1, 2], {
  get: function (target, key, receiver) {
    console.log('gettint',target, key, receiver)
    return Reflect.get(target, key, receiver)
  },
  set: function (target, key, value, receiver) {
    console.log('setting', target, key, value, receiver)
    return Reflect.set(target, key, value, receiver )
  }
})
// a.push(3)
a.slice(1)

